package com.zyh.Repository;

import com.zyh.entity.Roles;
import com.zyh.entity.Users;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface UserRepository extends JpaRepository<Users, Integer> {
    Users findByUsername(String username);

    List<Users> findByRoles(Roles roles);

    Users findById(int id);

    Users findByName(String info);

    Users findByUsernameAndRoles(String username,Roles roles);
    Users findByNameAndRoles(String name,Roles roles);
}
